package work.timejay.user.controller.books;


import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import work.timejay.common.ApiPageEntity;
import work.timejay.common.ApiResult;
import work.timejay.user.dto.books.BookTypePageDTO;
import work.timejay.user.service.books.BookTypeService;
import work.timejay.user.vo.books.BookTypePageVO;

/**
 * <p>
 * book类型表 前端控制器
 * </p>
 *
 * @author 王文杰
 * @since 2023-11-23
 */
@RestController
@RequestMapping("/book-type")
@Tag(name = "书本类型控制层",description = "BookTypeController")
public class BookTypeController {

    @Autowired
    private BookTypeService bookTypeService;

    @GetMapping
    public ApiResult<ApiPageEntity<BookTypePageVO>> page(BookTypePageDTO dto) {
        ApiPageEntity<BookTypePageVO> page = bookTypeService.bookPage(dto);
        return ApiResult.success(page);
    }
}

